package cn.itcast.dewu.utils;

public class ESConstants {
    /*
    商品的索引库*/
    public static final String GOODS_INDEX = "{\n" +
            "  \"settings\":{\n" +
            "    \"analysis\": {\n" +
            "      \"analyzer\": {\n" +
            "        \"text_anlyzer\":{\n" +
            "          \"tokenizer\":\"ik_max_word\",\n" +
            "          \"filter\":\"py\"\n" +
            "        },\n" +
            "        \"completion_anlyzer\":{\n" +
            "          \"tokenizer\":\"keyword\",\n" +
            "          \"filter\":\"py\"\n" +
            "        }\n" +
            "      },\n" +
            "      \"filter\": {\n" +
            "        \"py\":{\n" +
            "          \"type\":\"pinyin\",\n" +
            "          \"keep_full_pinyin\":false,\n" +
            "          \"keep_joined_full_pinyin\":true,\n" +
            "          \"keep_original\":true,\n" +
            "          \"limit_first_letter_length\":16,\n" +
            "          \"remove_duplicated_term\":true,\n" +
            "          \"none_chinese_pinyin_tokenize\":false\n" +
            "        }\n" +
            "      }\n" +
            "    }\n" +
            "  },\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"id\":{\n" +
            "          \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"name\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"typeId\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"images\":{\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"userId\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"dis\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"area\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"address\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"price\":{\n" +
            "        \"type\": \"double\"\n" +
            "      },\n" +
            "      \"sold\":{\n" +
            "        \"type\": \"integer\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"comments\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"score\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"buyComment\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"creatTime\":{\n" +
            "        \"type\": \"date\"\n" +
            "      },\n" +
            "      \"updateTime\":{\n" +
            "        \"type\": \"date\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"stock\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"goodsDes\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"type\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"completion_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"isMoney\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"all\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\"\n" +
            "    }\n" +
            "  }\n" +
            "}}";

    /*
     * 播客的索引
     * */
    public static final String BLOG_INDEX = "{\n" +
            "  \"settings\":{\n" +
            "    \"analysis\": {\n" +
            "      \"analyzer\": {\n" +
            "        \"text_anlyzer\":{\n" +
            "          \"tokenizer\":\"ik_max_word\",\n" +
            "          \"filter\":\"py\"\n" +
            "        },\n" +
            "        \"completion_anlyzer\":{\n" +
            "          \"tokenizer\":\"keyword\",\n" +
            "          \"filter\":\"py\"\n" +
            "        }\n" +
            "      },\n" +
            "      \"filter\": {\n" +
            "        \"py\":{\n" +
            "          \"type\":\"pinyin\",\n" +
            "          \"keep_full_pinyin\":false,\n" +
            "          \"keep_joined_full_pinyin\":true,\n" +
            "          \"keep_original\":true,\n" +
            "          \"limit_first_letter_length\":16,\n" +
            "          \"remove_duplicated_term\":true,\n" +
            "          \"none_chinese_pinyin_tokenize\":false\n" +
            "        }\n" +
            "      }\n" +
            "    }\n" +
            "  },\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"id\":{\n" +
            "          \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"goodsId\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"userId\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "       \"title\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"images\":{\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \n" +
            "      \"content\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"liked\":{\n" +
            "        \"type\": \"integer\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"comments\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"creatTime\":{\n" +
            "        \"type\": \"date\"\n" +
            "      },\n" +
            "      \"updateTime\":{\n" +
            "        \"type\": \"date\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"icon\":{\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"name\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"isLike\":{\n" +
            "        \"type\": \"boolean\"\n" +
            "      },\n" +
            "      \"goodsIcon\":{\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"goodsName\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"isMoney\":{\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": true\n" +
            "      },\n" +
            "       \"all\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\"\n" +
            "    }\n" +
            "  }\n" +
            " }\n" +
            "}";

    public static final Integer PAGE_DEFAULT_SIZE = 6;
}
